import request from '@/utils/request'
// 获取频道列表
export const artGetChannelsService = () => {
  return request.get('/my/cate/list')
}

// 添加文章
export const artAddArticleService = (data) => {
  return request.post('/my/cate/add', data)
}

// 编辑文章
export const artEditArticleService = (data) => {
  return request.put('/my/cate/info', data)
}
// 删除文章
export const artDeleteArticleService = (id) => {
  return request.delete('/my/cate/del', {
    params: {
      id
    }
  })
}
export const artGetListService = (params) => {
  return request.get('/my/article/list', {
    params
  })
}
//添加文章
export const artPublishService = (data) => request.post('/my/article/add', data)
// 删除文章
export const artDelService = (id) =>
  request.delete('my/article/info', { params: { id } })
// 编辑回显
export const artGetDetailService = (id) =>
  request.get('my/article/info', { params: { id } })

export const artEditService = (data) => request.put('my/article/info', data)
